import request from '@/utils/request'

// 获取短信验证码
export const getCode = (data)=>{
    // console.log('打印data',data)
    return request.post('/get/code',data)
}

// 校验短信验证码
export const userAuthentication = (data)=>{
    return request.post('/user/authentication',data)
}

// 用户登录
export const userLogin = (data)=>{
    return request.post('/login',data)
}

// 获取用户权限
export const authAdmin = (params)=>{
    // console.log('打印params',params)
    return request.get('/auth/admin',{params})
}

// 获取权限
export const userGetMenu = () =>{
    return request.get('/user/getmenu')
}

// 修改权限
export const userSetMenu = (data)=>{
    return request.post('/user/setmenu',data)
}

// 获取权限列表
export const menuList = (params)=>{
    return request.get('/menu/list',{params})
}

// 获取权限列表
export const menuSelectList = ()=>{
    return request.get('/menu/selectlist')
}

// 编辑用户权限
export const updateUser = (data)=>{
    return request.post('/update/user',data)
}

// 用户菜单权限
export const menuPermissions = ()=>{
    return request.get('/menu/permissions')
}

// 陪护师头像选择
export const photoList = ()=>{
    return request.get('/photo/list')
}

// 创建陪护师
export const companion = (data)=>{
    // console.log('api-data',data)
    return request.post('/companion',data)
}

// 获取陪护师列表
export const companionList = (params)=>{
    return request.get('/companion/list',{params})
}

// 移除陪护师
export const deleteCompanion = (data)=>{
    return request.post('/delete/companion',data)
}